package main

import "fmt"

type Student struct {
	Name string
	Age  int
}

func main() {
	// 方法1 安装顺序赋值操作
	var s1 Student = Student{"张三", 18}
	fmt.Println(s1)

	// 方法2 安装指定类型
	var s2 Student = Student{Name: "张三", Age: 19}
	fmt.Println(s2)

	// 方法3 想要返回结构体的指针类型
	var s3 *Student = &Student{Name: "张三", Age: 20}
	fmt.Println(s3)
	fmt.Println(*s3)
}
